<template>

    <div class="RoleAndPermissionManage">
      <template>
        <Menu @on-select="selectType" mode="horizontal" :theme="theme1" active-name="permissionManage">
          <MenuItem name="permissionManage">
            角色权限分配
          </MenuItem>
          <MenuItem name="roleManage">
            角色管理
          </MenuItem>
          <MenuItem name="permissionResourceManage">
            权限资源管理
          </MenuItem>
        </Menu>
      </template>
      <div v-if="modeType==='permissionManage'">
          <permission-manage/>
      </div>
      <div v-else-if="modeType==='roleManage'">
          <role-manage/>
      </div>
      <div v-else-if="modeType==='permissionResourceManage'">
       <PermissionResourceManage/>
      </div>

    </div>
</template>

<script lang="ts">

import {Component, Vue} from 'vue-property-decorator'
import PermissionManage from "@/components/PermissionManage.vue";
import PermissionResourceManage from "@/components/PermissionResourceManage.vue";
import RoleManage from "@/components/RoleManage.vue";

@Component({
  components: {
    PermissionManage,
    PermissionResourceManage,
    RoleManage
  }
})
export default class RoleAndPermissionManage extends Vue {

  theme1 ='light'
  modeType = 'permissionManage'
  // 切换菜单栏
  selectType(name){

    this.modeType = name
  }

}
</script>

<style scoped>

</style>
